local skel = fk.CreateSkill {
  name = "emo__mujie",
  tags = {Skill.Compulsory},
}

skel:addEffect(fk.AfterCardsMove, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(skel.name) and player:getHandcardNum() < player.hp then
      for _, move in ipairs(data) do
        if move.from == player then
          for _, info in ipairs(move.moveInfo) do
            if info.fromArea == Card.PlayerHand then
              return true
            end
          end
        end
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(player.hp - player:getHandcardNum(), skel.name)
  end,
})

Fk:loadTranslationTable{
  ["emo__mujie"] = "牧节",
  [":emo__mujie"] = "锁定技，当你失去手牌后，你将手牌摸至体力值。",
}


return skel
